from flask import jsonify

from main import app


@app.errorhandler(404)
def page_not_fonud(e):
    return jsonify({"message": "页面未找到！"}), 404


@app.errorhandler(500)
def server_error(e):
    return jsonify({"message": "服务器异常！"}), 500
